package com.hulu73.struts1.core;

import java.util.HashMap;

public class ActionConfig extends BaseConfig{
	
	 protected HashMap forwards = new HashMap();
	 
	 protected ModuleConfig moduleConfig = null;
	 
	 protected String forward = null;
	 
	 protected String name = null;
	 
	 protected String path = null;
	 
	 protected String prefix = null;
	 
	 protected String type = null;
	 
	 protected String command = null;
	 
	 public ModuleConfig getModuleConfig() {
        return (this.moduleConfig);
     }
	 
	 public void setModuleConfig(ModuleConfig moduleConfig) {
        this.moduleConfig = moduleConfig;
	 }
	 
	 public String getAttribute() {
		 return (this.name);
	  }
	 
	 public String getForward() {
	        return (this.forward);
	  }

	 public void setForward(String forward) {
	        this.forward = forward;
	 }

	 public String getName() {
	        return (this.name);
	    }

	 public void setName(String name) {
	        this.name = name;
	    }
	 public String getPath() {
	        return (this.path);
	    }
	 
	 public void setPath(String path) {
	      
	        this.path = path;
	    }

	public HashMap getForwards() {
		return forwards;
	}

	public void setForwards(HashMap forwards) {
		this.forwards = forwards;
	}

	public String getPrefix() {
		return prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCommand() {
		return command;
	}

	public void setCommand(String command) {
		this.command = command;
	}
	public void addForwardConfig(ForwardConfig config) {
        forwards.put(config.getName(), config);
    }
	
	 public ForwardConfig findForwardConfig(String name) {
	        return ((ForwardConfig) forwards.get(name));
	 }
	 public ForwardConfig[] findForwardConfigs() {
        ForwardConfig[] results = new ForwardConfig[forwards.size()];

        return ((ForwardConfig[]) forwards.values().toArray(results));
    }

}
